#include <stdio.h>
void main()
{
    static char *a[][10]={"","I","II","III","IV","V","VI","VII","VIII","IX",
                            "","X","XX","XXX","XL","L","LX","LXX","LXXX","XCC",
                            "","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"};
    int i,n,t,m;
    printf("Please enter number:");
    scanf("%d",&n);
    printf("%d=",n);
    for(m=0,i=1000;m<3;m++,i/=10)
    {
        t=(n%i)/(i/10);
        printf("%s",a[2-m][t]);
    }
    printf("\n");
}